
package org.cuatrovientos.rollthedice;

import java.util.Random;

/**
 * @author mikel_luquin
 *
 */
public class Dice {

        private int faces;
        private boolean Null = true;
        
        //constructor
        public Dice() {
        	this.faces = 6;// put the number of faces of the dice
        }
        
        public Dice (int faces) {
                
        }
        public Dice (boolean Null, int faces) {
        	this.Null = Null;
            this.faces = faces;
                
        }
        //throw the dice
        public int Throw() {
        Random rnd = new Random();//choose random numbers
        if(Null) {
        	return rnd.nextInt(faces);
        } else {
        	return(int)(Math.random()*faces+1);
                }
        }
}
